package com.yupi.yuoj.service;

import jakarta.annotation.Resource;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.stereotype.Service;

/**
 * @Classname MessageSenderService
 * @Description rocketmq发送消息
 * @Date 2025/11/23 14:57
 * @Created by 李胜
 */
@Service
public class MessageSenderService {

    @Resource
    private RocketMQTemplate rocketMQTemplate;

    public static final String TOPIC = "judge-submission";

    public void sendString(String msg) {
        rocketMQTemplate.convertAndSend(TOPIC, msg);
        System.out.println("普通消息发送完成");
    }
}
